<script type="text/javascript">
//全局变量
var GV = {
    DIMAUB: "__THEMES__",
    JS_ROOT: "statics/js/",
    TOKEN: ""
};
</script>
<!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="__STATIC__/jquery-2.0.3.min.js"></script>
    <script src="__STATIC__/bootstrap/js/bootstrap.min.js"></script>
  
	<script>
       
  
    	   
       
   
	$(function(){
		var a = '{$nav_url}';
		$('#navbar').find('a[href="'+'{$nav_url}'+'"]').closest('li').addClass('active');  
		
		if(a==''){
			$('#nav-00').closest('li').addClass('active');
		}
		
		$(".goods-list li").hover(
 				function(){
 				   //当鼠标放上去的时候,程序处理
 				   $(this).addClass("hover1 hover");
 				},
 				function(){
 				   //当鼠标离开的时候,程序处理
 				   $(this).removeClass("hover1 hover");
 				});
 		
 		$('.article-list').find('li').hover(
				function(){
					$(this).css('box-shadow','0px 2px 8px 3px #ccc');
				},
				function(){
					$(this).css('box-shadow','');
				}
			
		);
		
	});

function favor(goodsid){
    $.get("{:U('ajax/favor')}",{id:goodsid},function(json){
            showmsg(json.info);
    })    
}    
function showmsg(msg){
	$("#tip").remove();
	$tip = $('<div id="tip" style="font-weight:bold;position:fixed;top:240px;left: 50%;z-index:9999;background:rgb(255, 45, 94);padding:18px 30px;border-radius:8px;color:#fff;font-size:16px;">'+msg+'</div>');
    $('body').append($tip);
	$tip.stop(true).css('margin-left', -$tip.outerWidth() / 2).fadeIn(500).delay(2000).fadeOut(500);
}
<block name="script">
</block>
</script>



